package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysBusinessFinanceMapper;
import com.ruoyi.system.domain.SysBusinessFinance;
import com.ruoyi.system.service.ISysBusinessFinanceService;

/**
 * 商家财务Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-06
 */
@Service
public class SysBusinessFinanceServiceImpl implements ISysBusinessFinanceService 
{
    @Autowired
    private SysBusinessFinanceMapper sysBusinessFinanceMapper;

    /**
     * 查询商家财务
     * 
     * @param id 商家财务主键
     * @return 商家财务
     */
    @Override
    public SysBusinessFinance selectSysBusinessFinanceById(String id)
    {
        return sysBusinessFinanceMapper.selectSysBusinessFinanceById(id);
    }

    @Override
    public SysBusinessFinance selectSysBusinessFinanceByBusinessId(String businessId) {
        return sysBusinessFinanceMapper.selectSysBusinessFinanceByBusinessId(businessId);
    }

    /**
     * 查询商家财务列表
     * 
     * @param sysBusinessFinance 商家财务
     * @return 商家财务
     */
    @Override
    public List<SysBusinessFinance> selectSysBusinessFinanceList(SysBusinessFinance sysBusinessFinance)
    {
        return sysBusinessFinanceMapper.selectSysBusinessFinanceList(sysBusinessFinance);
    }

    /**
     * 新增商家财务
     * 
     * @param sysBusinessFinance 商家财务
     * @return 结果
     */
    @Override
    public int insertSysBusinessFinance(SysBusinessFinance sysBusinessFinance)
    {
        sysBusinessFinance.setCreateTime(DateUtils.getNowDate());
        return sysBusinessFinanceMapper.insertSysBusinessFinance(sysBusinessFinance);
    }

    /**
     * 修改商家财务
     * 
     * @param sysBusinessFinance 商家财务
     * @return 结果
     */
    @Override
    public int updateSysBusinessFinance(SysBusinessFinance sysBusinessFinance)
    {
        sysBusinessFinance.setUpdateTime(DateUtils.getNowDate());
        return sysBusinessFinanceMapper.updateSysBusinessFinance(sysBusinessFinance);
    }

    /**
     * 批量删除商家财务
     * 
     * @param ids 需要删除的商家财务主键
     * @return 结果
     */
    @Override
    public int deleteSysBusinessFinanceByIds(String[] ids)
    {
        return sysBusinessFinanceMapper.deleteSysBusinessFinanceByIds(ids);
    }

    /**
     * 删除商家财务信息
     * 
     * @param id 商家财务主键
     * @return 结果
     */
    @Override
    public int deleteSysBusinessFinanceById(String id)
    {
        return sysBusinessFinanceMapper.deleteSysBusinessFinanceById(id);
    }
}
